package com.jyu.apts.dto;

import com.jyu.apts.entity.ItemProcess;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ItemProcessDto {
	long id;//主键
	String name;//名称
	int itemProcessOrder;//优先级
	String image;
	ItemProductionLineDto itemProductionLine;
	
	public ItemProcessDto convert(ItemProcess itemProcess) {
		setId(itemProcess.getId());
		setName(itemProcess.getName());
		setItemProcessOrder(itemProcess.getItemProcessOrder());
		setItemProductionLine(new ItemProductionLineDto().convert(itemProcess.getItemProductionLine()));
		setImage(itemProcess.getImage());
		return this;
	}
	
}
